/**
 * Copyright &copy; 2012-2017 <a href="https://vivo.com">vivo</a> All rights reserved.
 */
package com.vivo.retail.entity;

import org.hibernate.validator.constraints.Length;
import com.thinkgem.jeesite.modules.sys.entity.User;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 零售单Entity
 * @author jyangye
 * @version 2017-11-17
 */
public class VivoRetailOrder extends DataEntity<VivoRetailOrder> {
	
	private static final long serialVersionUID = 1L;
	private String warehouseId;		// 仓库名称
    private String userId;
	private String dealerId;		// 零售经销商ID
    private String waresId;         // 商品ID
	private String dealerRelationId;		// 零售经销商关系ID
	private String type;		// 零售类型(零售销售、零售退货)
	private String orderCode;		// 订单编号
	private String handEmployeeId;		// 经手人员工ID
    private String orderState;		// 单据状态(草稿、正常)
	private String verifyState;		// 本级审核状态(无须审核,未审核,正在审核,审核未通过,审核已通过)
	private Date makeDate;		// 制单日期

    private Double unitPrice; // 单价
    private Integer salesCount; // 销量
    private Double sumMoney; // 总价

    private String payType; // 付款方式

	private Date beginMakeDate;		// 开始 制单日期
	private Date endMakeDate;		// 结束 制单日期
	
	public VivoRetailOrder() {
		super();
	}

	public VivoRetailOrder(String id){
		super(id);
	}

	@Length(min=1, max=11, message="名称长度必须介于 1 和 11 之间")
	public String getWarehouseId() {
		return warehouseId;
	}

	public void setWarehouseId(String warehouseId) {
		this.warehouseId = warehouseId;
	}


    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Length(min=1, max=11, message="零售经销商ID长度必须介于 1 和 11 之间")
	public String getDealerId() {
		return dealerId;
	}

	public void setDealerId(String dealerId) {
		this.dealerId = dealerId;
	}
	
	@Length(min=0, max=11, message="零售经销商关系ID长度必须介于 0 和 11 之间")
	public String getDealerRelationId() {
		return dealerRelationId;
	}

	public void setDealerRelationId(String dealerRelationId) {
		this.dealerRelationId = dealerRelationId;
	}
	
	@Length(min=0, max=10, message="零售类型(零售销售、零售退货)长度必须介于 0 和 10 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Length(min=0, max=30, message="订单编号长度必须介于 0 和 30 之间")
	public String getOrderCode() {
		return orderCode;
	}

	public void setOrderCode(String orderCode) {
		this.orderCode = orderCode;
	}

	
	@Length(min=0, max=32, message="经手人员工ID长度必须介于 0 和 32 之间")
	public String getHandEmployeeId() {
		return handEmployeeId;
	}

	public void setHandEmployeeId(String handEmployeeId) {
		this.handEmployeeId = handEmployeeId;
	}

	@Length(min=0, max=1, message="本级审核状态(无须审核,未审核,正在审核,审核未通过,审核已通过)长度必须介于 0 和 1 之间")
	public String getVerifyState() {
		return verifyState;
	}

	public void setVerifyState(String verifyState) {
		this.verifyState = verifyState;
	}


	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getMakeDate() {
		return makeDate;
	}

	public void setMakeDate(Date makeDate) {
		this.makeDate = makeDate;
	}
	
	@Length(min=0, max=1, message="单据状态(草稿、正常)长度必须介于 0 和 1 之间")
	public String getOrderState() {
		return orderState;
	}

	public void setOrderState(String orderState) {
		this.orderState = orderState;
	}
		
	public Date getBeginMakeDate() {
		return beginMakeDate;
	}

	public void setBeginMakeDate(Date beginMakeDate) {
		this.beginMakeDate = beginMakeDate;
	}
	
	public Date getEndMakeDate() {
		return endMakeDate;
	}

	public void setEndMakeDate(Date endMakeDate) {
		this.endMakeDate = endMakeDate;
	}


    public String getWaresId() {
        return waresId;
    }

    public void setWaresId(String waresId) {
        this.waresId = waresId;
    }

    public Double getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(Double unitPrice) {
        this.unitPrice = unitPrice;
    }

    public Integer getSalesCount() {
        return salesCount;
    }

    public void setSalesCount(Integer salesCount) {
        this.salesCount = salesCount;
    }

    public Double getSumMoney() {
        return sumMoney;
    }

    public void setSumMoney(Double sumMoney) {
        this.sumMoney = sumMoney;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }
}